//#define _CRT_SECURE_NO_WARNINGS
//
//#include<stdio.h>
////
////int main()
////{
////	FILE* fp = fopen("data.txt", "r");
////	if (NULL == fp)
////	{
////		perror("fopen");
////		return 1;
////	}
////	
////	char ch;
////	while ((ch = fgetc(fp)) != EOF)
////		printf("%c", ch);
////	printf("\n");
////
////	fclose(fp);
////	fp = NULL;
////
////	return;
////}
//
//
//int main()
//{
//	FILE* fp = fopen("data.txt", "rb");
//	if (NULL == fp)
//	{
//		perror("fopen");
//		return 1;
//	}
//
//	int str[10] = {0};
//
//	int ret = fread(str, sizeof(int), 1, fp);
//	for (int i = 0; i < 10; i++)
//		printf("%d ", str[i]);
//
//	printf("\nret = %d\n", ret);
//
//	return;
//}
//
////int main()
////{
////	char str1[20] = { 0 };
////	char str2[20] = { 0 };
////
////	gets(str1);
////	fgets(str2, 5 + 1, stdin);
////
////	return 0;
////}
//
////int main()
////{
////	char str[] = "abcdef";
////
////	puts(str);
////	printf("HELLO");
////
////	printf("\n");
////
////	fputs(str, stdout);
////	printf("HELLO");
////
////	printf("\n");
////
////	return 0;
////}

#include<stdio.h>

int main()
{
	int dog[2] = { 0 };
	int count = 0;

	int nums[] = { 1,2,3,4,5,1,2,3,4,6 };
	int len = sizeof(nums) / sizeof(int);

	int max = nums[0];
	int min = nums[0];
	for (int i = 0; i < len; i++)
	{
		if (max < nums[i])
			max = nums[i];
		if (min > nums[i])
			min = nums[i];
	}

	int range = max - min + 1;             //

	int* temp = (int*)malloc(sizeof(int) * range);

	memset(temp, 0, sizeof(int) * range);

	for (int i = 0; i < len; i++)
	{
		/*temp[nums[i] - min]++;  */       //
		(*(temp + (nums[i] - min)))++;
	}

	for (int i = 0; i < range; i++)
	{
		if (temp[i] == 1)
		{
			dog[count] = i + min;
			count++;
		}
		if (count == 2)
			break;
	}

	printf("dog1 = %d, dog2 = %d\n", dog[0], dog[1]);

	return 0;
}